<?php
/**
{
    "scoreLogId": "INT //日志id",
    "uid": "INT //用户@foreign::tbl_user; @noload; @search; ",
    "score": "INT //积分",
    "scoreType": "SMALLINT //积分类型@status; 1::购买消费; 2::点评; 3::发表动态; 4::分享; 5::喜欢; 6::赞赏; 7::反馈建议; 8::消费抵扣; ",
    "reason": "VARCHAR //变动原因",
    "info": "VARCHAR //链接标题信息@search; ",
    "img": "VARCHAR //图片@image; ",
    "url": "VARCHAR //地址",
    "ip": "VARCHAR //ip@noLoad; @delete; ",
    "created": "DATETIME //创建日期@noload; "
}
 */

class ScoreLog extends Base
{
    
	private $scoreLogId= '';//日志id
	private $uid= '';//用户@foreign::tbl_user;@noload;@search;
	private $score= '';//积分
	private $scoreType= "0";//积分类型@status;1::购买消费;2::点评;3::发表动态;4::分享;5::喜欢;6::赞赏;7::反馈建议;8::消费抵扣;
	private $reason= NULL;//变动原因
	private $info= NULL;//链接标题信息@search;
	private $img= NULL;//图片@image;
	private $url= NULL;//地址
	private $ip= NULL;//ip@noLoad;@delete;
	private $created= 'CURRENT_TIMESTAMP';//创建日期@noload;

    public $isDbData = false;

    public function __construct()
    {
        parent::__construct();
    }


    public function __get($name) {
        return $this->$name;
    }

    public function __set($name, $value) {
        if(!$this->isDbData){
            if(!in_array($name,$this->loadedFiled))$this->loadedFiled[] = $name;
        }

        $this->$name=$value;
        $this->arr[$name] = $value;
    }

    public  function table()
    {
        return 'tbl_score_log';
    }
    
    public  function key(){
        return 'scoreLogId';
    }


    
    public static  function hideField()
    {
        return [];
    }
            
    public static  function skipField()
    {
        return [];
    }
            
    public static  function noViewField()
    {
        return [];
    }
            
    public static  function jsonField()
    {
        return [];
    }
            
    public static  function noLoadField()
    {
        return array (  0 => 'ip',);
    }
            
    public static  function deleteField()
    {
        return array (  0 => 'ip',);
    }
            
    public function className()
    {
        return 'ScoreLog';
    }
    
    public  function field()
    {
        return array (  'scoreLogId' =>   array (    0 => 'INT',    1 => 11,    2 => '日志id',  ),  'uid' =>   array (    0 => 'INT',    1 => 11,    2 => '用户@foreign::tbl_user;@noload;@search;',  ),  'score' =>   array (    0 => 'INT',    1 => 11,    2 => '积分',  ),  'scoreType' =>   array (    0 => 'SMALLINT',    1 => 6,    2 => '积分类型@status;1::购买消费;2::点评;3::发表动态;4::分享;5::喜欢;6::赞赏;7::反馈建议;8::消费抵扣;',  ),  'reason' =>   array (    0 => 'VARCHAR',    1 => 255,    2 => '变动原因',  ),  'info' =>   array (    0 => 'VARCHAR',    1 => 512,    2 => '链接标题信息@search;',  ),  'img' =>   array (    0 => 'VARCHAR',    1 => 512,    2 => '图片@image;',  ),  'url' =>   array (    0 => 'VARCHAR',    1 => 512,    2 => '地址',  ),  'ip' =>   array (    0 => 'VARCHAR',    1 => 15,    2 => 'ip@noLoad;@delete;',  ),  'created' =>   array (    0 => 'DATETIME',    1 => 0,    2 => '创建日期@noload;',  ),);
    }


}